package com.older.wptsb.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.older.wptsb.domain.po.AlertLog;
import com.older.wptsb.domain.po.Community;
import com.older.wptsb.domain.vo.AlertLogVO;
import com.older.wptsb.domain.vo.CommunityContactVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;


@Mapper
public interface CommunityMapper extends BaseMapper<Community> {
    List<AlertLogVO> getAlertLog(Integer communityId);

    AlertLogVO getAlertLogById(@Param("data_id") Integer id);

    List<CommunityContactVO> getCommunityUser(Integer communityId);

    Integer selectElderCount(Integer communityId);
    @Update("update community set elder_count = #{count} where community_id = #{communityId}")
    void updateElderCount(@Param("communityId") Integer communityId, @Param("count") Integer count);
}
